Skip to content

Conversation

antonilol
Copy link

(for Bitcoin's VarInt and VarUInt)

i use this library for parsing the entire blockchain (blk files) and this functionality would be great addition to the other functions

great info site: https://learnmeabitcoin.com/technical/varint

basically the first byte tells how much bytes long the numbers is or is the number himself

(for Bitcoin's VarInt and VarUInt)
@normanr
Copy link

normanr commented Oct 4, 2022

Note that protocol buffer varints are different: They store 7 bits-per-byte, and use the most-significant-bit as a continuation bit. The encoding is called VLQ, (compared to LEB128 which is the little-endian version). Bitcoin and utf8 use a "PrefixVarint".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants